home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / SPECS / MIDISPEC.ZIP / MIDISPEC.TXT
Encoding:
Internet Message Format  |  1996-11-15  |  25.3 KB

  1. From: rstevew@armory.com (Richard Steven Walz)
  2. Subject: Re: Generating MIDI signals
  3. Date: Thu, 29 Sep 1994 15:17:11 GMT
  4.  
  5. In article <1994Sep24.032622.20528@cs.mun.ca>,
  6. Ian Robert Janes <ijanes@cs.mun.ca> wrote:
  7. >Ian
  8. --------------------------------------------
  9. Your subject line says you want to know how to generate MIDI signals.
  10. Here's the MIDI spec 1.0 to start you off. Then there's a cute hack that
  11. involves just changing the crystal on a serial port card to MIDI compatible
  12. bit rates. It's after the end of the spec.
  13. -Steve Walz   rstevew@armory.com
  14. ----------------------------------------
  15.  
  16.  (Call IMA and order your copy of this
  17.   specification, which offers
  18.   additional information NOT contained in
  19.   this file, to include important
  20.   diagrams and graphs,...etc.)
  21.  
  22. MIDI
  23. MUSICAL INSTRUMENT DIGITAL INTERFACE
  24.  
  25. Specification 1.0
  26. INTRODUCTION
  27.  
  28. MIDI is the acronym for Musical Instrument Digital Interface.
  29.  
  30. MIDI enables synthesizers, sequencers, home computers, rhythm machines, etc.
  31. to be intercon- nected through a standard interface.
  32.  
  33. Each MIDI-equipped instrument usually contains a receiver and a transmitter.
  34. Some instruments may contain only a receiver or transmitter.  The receiver
  35. receives messages in MIDI format and executes MIDI commands.  It consists of an
  36. optoisolator, Universal Asynchronous Receiver/Transmitter (UART), and other
  37. hardware needed to perform the intended functions.  The transmitter originates
  38. messages in MIDI format, and transmits them by way of a UART and line driver.
  39.  
  40. The MIDI standard hardware and data format are defined in this specification.
  41.  
  42.  
  43. CONVENTIONS
  44.  
  45. Status and Data bytes given in Tables I through VI are given in binary.
  46.  
  47. Numbers followed by an "H" are in hexadecimal.
  48.  
  49. All other numbers are in decimal.
  50.  
  51.  
  52. HARDWARE
  53.  
  54. The interface operates at 31.25 (+/- 1%) Kbaud, asynchronous, with a start
  55. bit, 8 data bits (D0 to D7), and a stop bit.  This makes a total of 10 bits for
  56. a period of 320 microseconds per serial byte.
  57.  
  58. Circuit: 5 mA current loop type.  Logical 0 is current ON.  One output shall
  59. drive one and only one input.  The receiver shall be opto-isolated and require
  60. less than 5 mA to turn on.  Sharp PC-900 and HP 6N138 optoisolators have been
  61. found acceptable.  Other high-speed optoisolators may be satisfactory.  Rise
  62. and fall times should be less than 2 microseconds.
  63.  
  64. Connectors: DIN 5 pin (180 degree) female panel mount receptacle.  An example
  65. is the SWITCHCRAFT 57 GB5F.  The connectors shall be labelled "MIDI IN" and
  66. "MIDI OUT".  Note that pins 1 and 3 are not used, and should be left
  67. unconnected in the receiver and transmitter.
  68.  
  69. NOTES:
  70.  
  71. 1. Optoisolator is Sharp PC-900.
  72.      (HP 6N138 or other optoisolator can be used with appropriate changes.)
  73.  
  74. 2. Gates "A" are IC or transistor.
  75.  
  76. 3. Resistors are 5%
  77.  
  78.  
  79. Cables shall have a maximum length of fifty feet (15 meters), and shall be
  80. terminated on each end by a corresponding 5-pin DIN male plug, such as the
  81. SWITCHCRAFT 05GM5M.  The cable shall be shielded twisted pair, with the shield
  82. connected to pin 2 at both ends.
  83.  
  84. A "MIDI THRU" output may be provided if needed, which provides a direct copy
  85. of data coming in MIDI IN.  For very long chain lengths (more than three
  86. instruments), higher-speed optoisolators must be used to avoid additive
  87. rise/fall time errors which affect pulse width duty cycle.
  88.  
  89.  
  90. DATA FORMAT
  91.  
  92. All MIDI communication is acheived through multi-byte "messages" consisting of
  93. one Status byte followed by one or two Data bytes, except Real-Time and
  94. Exclusive messages (see below).
  95.  
  96. MESSAGE TYPES
  97.  
  98. Messages are divided into two main categories: Channel and System.
  99.  
  100. Channel
  101.  
  102. Channel messages contain a four-bit number in the Status byte which address
  103. the message specifically to one of sixteen channels.  These messages are
  104. thereby intended for any units in a system whose channel number matches the
  105. channel number encoded into the Status byte.
  106.  
  107. There are two types of Channel messages: Voice and Mode.
  108.  
  109.         Voice
  110.         To control the instrument's voices, Voice messages are sent
  111.         over the Voice Channels.
  112.  
  113.         Mode
  114.         To define the instrument's response to Voice messages, Mode
  115.  messages are sent over the instument's Basic Channel.
  116.  
  117.  
  118. System
  119. System messages are not encoded with channel numbers.
  120.  
  121. There are three types of System messages: Common, Real-Time, and Exclusive.
  122.  
  123.         Common
  124.         Common messages are intended for all units in a system.
  125.  
  126.         Real-Time
  127.         Real-Time messages are intended for all units in a system.
  128.         They contain Status bytes only -- no Data bytes.  Real-Time
  129.  messages may be sent at any time -- even between bytes of a
  130.         message which has a different status.  In such cases the
  131.         Real-Time message is either ignored or acted upon, after which
  132.         the receiving process resumes under the previous status.
  133.  
  134.         Exclusive
  135.         Exclusive messages can contain any number of Data bytes, and
  136.         are terminated by an End of Exclusive (EOX) or any other Status
  137.         byte.  These messages include a Manufacturer's Identification
  138.         (ID) code.  If the receiver does not recognize the ID code, it
  139.         should ignore the ensuing data.
  140.  
  141.         So that other users can fully access MIDI instruments,  manufacturers
  142.         should publish the format of data following their ID code. Only the
  143.  manufacturer can update the format following their ID.
  144.  
  145. DATA TYPES
  146.  
  147. Status Bytes
  148.  
  149. Status bytes are eight-bit binary numbers in which the Most Significant Bit
  150. (MSB) is set (binary 1).  Status bytes serve to identify the message type, that
  151. is, the purpose of the Data bytes which follow the Status byte.
  152.  
  153. Except for Real-Time messages, new Status bytes will always command the
  154. receiver to adopt their status, even if the new Status is received before the
  155. last message was completed.
  156.  
  157.         Running Status
  158.         For Voice and Mode messages only, when a Status byte is
  159.  received and processed, the receiver will remain in that status
  160.    until a different Status byte is received.  Therefore, if the same
  161.         Status byte would be repeated, it may (optionally) be omitted so
  162.         that only the correct number of Data bytes need be sent.  Under
  163.         Running Status, then, a complete message need only consist of
  164.         specified Data bytes sent in the specified order.
  165.  
  166.         The Running Status feature is especially useful for
  167.         communicating long strings of Note On/Off messages, where
  168.         "Note On with Velocity of 0" is used for Note Off.  (A separate
  169.         Note Off Status byte is also available.)
  170.  
  171.         Running Status will be stopped when any other Status byte 
  172.  intervenes, except that Real-Time messges will only interrupt    
  173.  the Running Status temporarily.
  174.  
  175.         Unimplemented Status
  176.         Any status bytes received for functions which the receiver has  not
  177.  implemented should be ignored, and subsequent data bytes ignored.
  178.  
  179.         Undefined Status
  180.         Undefined Status bytes must not be used.  Care should be taken  to
  181.  prevent illegal messages from being sent during power-up or
  182.         power-down.  If undefined Status bytes are received, they     
  183.  should be ignored, as should subsequent Data bytes.
  184.  
  185. Data Bytes
  186. Following the Status byte, there are (except for Real-Time messages) one or
  187. two Data bytes which carry the content of the message.  Data bytes are
  188. eight-bit binary numbers in which the MSB is reset (binary 0).  The number and
  189. range of Data bytes which must follow each Status byte are specified in the
  190. tables which follow.  For each Status byte the correct number of Data bytes
  191. must always be sent.  Inside the receiver, action on the message should wait
  192. until all Data bytes required under the current status are received.  Receivers
  193. should ignore Data bytes which have not been properly preceeded by a valid
  194. Status byte (with the exception of "Running Status," above).
  195.  
  196.  
  197. CHANNEL MODES
  198.  
  199. Synthesizers contain sound generation elements called voices.  Voice
  200. assignment is the algorithmic process of routing Note On/Off data from the
  201. keyboard to the voices so that the musical notes are correctly played with
  202. accurate timing.
  203.  
  204. When MIDI is implemented, the relationship between the sixteen available MIDI
  205. channels and the synthesizer's voice assignment must be defined.  Several Mode
  206. messages are available for this purpose (see Table III).  They are Omni
  207. (On/Off), Poly, and Mono.  Poly and Mono are mutually exclusive, i.e., Poly
  208. Select disables Mono, and vice versa.  Omni, when on, enables the receiver to
  209. receive Voice messages in all voice Channels without discrimination.  When Omni
  210. is off, the receiver will accept Voice messages from only the selected Voice
  211. Channel(s).  Mono, when on, restricts the assignment of Voices to just one
  212. voice per Voice Channel (Monophonic.)  When Mono is off (=Poly On), any number
  213. of voices may be allocated by the Receiver's normal voice assignment algorithm
  214. (Polyphonic.)
  215.  
  216. For a receiver assigned to Basic Channel "N," the four possible modes arising
  217. from the two Mode messages are:
  218.  
  219.  Mode   Omni
  220.  
  221.  
  222. 1       On      Poly    Voice messages are received from all Voice
  223.      channels and assigned to voices polyphonically.
  224.   
  225. 2       On      Mono    Voice messages are received from all Voice
  226.              Channels, and control only one voice,
  227.                     monophonically.
  228.  
  229. 3       Off     Poly    Voice messages are received in Voice channel N
  230.            only, and are assigned to voices polyphonically.
  231.  
  232. 4       Off     Mono    Voice messages are received in Voice channels
  233.            N thru N+M-1, and assigned monophonically to
  234.                  voices 1 thru M, respectively.  The number of                 
  235.  voices M is specified
  236.    by the third byte of the Mono Mode Message.
  237.  
  238. Four modes are applied to transmitters (also assigned to Basic Channel N).
  239. Transmitters with no channel selection capability will normally transmit on
  240. Basic Channel 1 (N=0).
  241.  
  242. Mode    Omni
  243.  
  244.  
  245. 1       On      Poly    All voice messages are transmitted in Channel N.
  246.  
  247. 2       On      Mono    Voice messages for one voice are sent in Channel N.
  248.  
  249. 3       Off     Poly    Voice messages for all voices are sent in Channel N.
  250.  
  251. 4       Off     Mono    Voice messages for voices 1 thru M are
  252.     transmitted in Voice Channels N thru N+M-1,
  253.                         respectively.  (Single voice per channel).
  254.  
  255. A MIDI receiver or transmitter can operate under one and only one mode at a
  256. time.  Usually the receiver and transmitter will be in the same mode.  If a
  257. mode cannot be honored by the receiver, it may ignore the message (and any
  258. subsequent data bytes), or it may switch to an alternate mode (usually Mode 1,
  259. Omni  On/Poly).
  260.  
  261. Mode messages will be recognized by a receiver only when sent in the Basic
  262. Channel to which the receiver has been assigned, regardless of the current
  263. mode.  Voice messages may be received in the Basic Channel and in other
  264. channels (which are all called Voice Channels), which are related specifically
  265. to the Basic channel by the rules above, depending on which mode has been
  266. selected.
  267.  
  268. A MIDI receiver may be assigned to one or more Basic Channels by default or by
  269. user control.  For example, an eight-voice synthesizer might be assigned to
  270. Basic Channel 1 on power-up.  The user could then switch the instrument to be
  271. configured as two four-voice synthesizers, each assigned to its own Basic
  272. Channel.  Separate Mode messages would then be sent to each four-voice
  273. synthesizer, just as if they were physically separate instruments.
  274.  
  275. POWER-UP DEFAULT CONDITIONS
  276.  
  277. On power-up all instruments should default to Mode #1.  Except for Note On/Off
  278. Status, all Voice messages should be disabled.  Spurious or undefined
  279. transmissions must be suppressed.
  280.  
  281.  
  282.  TABLE I
  283.  
  284. SUMMARY OF STATUS BYTES
  285.  
  286.  
  287. STATUS  # OF DATA       DESCRIPTION
  288. D7---D0 BYTES
  289.  
  290. Channel Voice Messages
  291.  
  292. 1000nnnn                2       Note Off event
  293.  
  294. 1001nnnn                2       Note On event (velocity=0: Note Off)
  295.  
  296. 1010nnnn                2       Polyphonic key pressure/after touch
  297.  
  298. 1011nnnn                2       Control change
  299.  
  300. 1100nnnn                1       Program change
  301.  
  302. 1101nnnn                1       Channel pressure/after touch
  303.  
  304. 1110nnnn                2       Pitch bend change
  305.  
  306.  
  307. Channel Mode Messages
  308.  
  309. 1011nnnn                2       Selects Channel Mode
  310.  
  311.  
  312. System Messages
  313.  
  314. 11110000                *****   System Exclusive
  315.  
  316. 11110sss                0 to 2  System Common
  317.  
  318. 11111ttt                0       System Real Time
  319.  
  320.  
  321. NOTES:
  322.         nnnn:   N-1, where N = Channel #,
  323.                         i.e. 0000 is Channel 1.
  324.                         0001 is Channel 2.
  325.                         .
  326.                         .
  327.                         .
  328.                         1111 is Channel 16.
  329.         *****:  0iiiiiii, data, ..., EOX
  330.         iiiiiii:        Identification
  331.         sss:    1 to 7
  332.         ttt:    0 to 7
  333.  
  334.  
  335. TABLE II
  336.  
  337. CHANNEL VOICE MESSAGES
  338.  
  339.  
  340. STATUS  DATA BYTES      DESCRIPTION
  341.  
  342.  
  343. 1000nnnn        0kkkkkkk        Note Off (see notes 1-4)
  344.         0vvvvvvv        vvvvvvv: note off velocity
  345.  
  346. 1001nnnn        0kkkkkkk        Note On (see notes 1-4)
  347.         0vvvvvvv        vvvvvvv - 0: velocity
  348.                         vvvvvvv = 0: note off
  349.  
  350. 1010nnnn        0kkkkkkk        Polyphonic Key Pressure (After-Touch)
  351.         0vvvvvvv        vvvvvvv: pressure value
  352.  
  353. 1011nnnn        0ccccccc        Control Change
  354.         0vvvvvvv        ccccccc: control # (0-121) (see notes 5-8)
  355.                         vvvvvvv: control value
  356.  
  357.                         ccccccc = 122 thru 127: Reserved.
  358.                         (See Table III)
  359.  
  360. 1100nnnn        0ppppppp        Program Change
  361.                         ppppppp: program number (0-127)
  362.  
  363. 1101nnnn        0vvvvvvv        Channel Pressure (After-Touch)
  364.                         vvvvvvv: pressure value
  365.  
  366. 1110nnnn        0vvvvvvv        Pitch Bend Change LSB (see note 10)
  367.         0vvvvvvv        Pitch Bend Change MSB
  368.  
  369.  
  370.  
  371. NOTES:
  372.  
  373. 1. nnnn: Voice Channel # (1-16, coded as defined in Table I notes)
  374.  
  375. 2. kkkkkkk: note # (0 - 127)
  376.       kkkkkkk = 60: Middle C of keyboard
  377.  
  378.     0     12     24     36     48     60     72     84     96     108     120
  379.     127
  380.   -----------------------------------------------------------------
  381.                 ac        c         c          c          c         c
  382. c          c
  383.                          |-------------- piano range -------------------|
  384.  
  385.  
  386. 3. vvvvvvv: key velocity
  387.       A logarithmic scale would be advisable.
  388.  
  389.    0                  1                                      64
  390.                       127
  391.   -------------------------------------------------------------------
  392.   off                 ppp      pp      p     mp      mf      f
  393.           ff        fff
  394.  
  395.    vvvvvvv = 64: in case of no velocity sensors
  396.    vvvvvvv = 0: Note Off, with velocity = 64
  397.  
  398.  
  399. 4.  Any Note On message sent should be balanced by sending a Note Off message
  400. for that note in that channel at some later time.
  401.  
  402.  
  403. 5.  ccccccc: control number
  404.  
  405.  
  406.         ccccccc Description
  407.  
  408.  
  409.         0       Continuous Controller 0 MSB
  410.         1       Continuous Controller 1 MSB (MODULATION BENDER)
  411.         2       Continuous Controller 2 MSB
  412.         3       Continuous Controller 3 MSB
  413.         4-31    Continuous Controllers 4-31 MSB
  414.         32      Continuous Controller 0 LSB
  415.         33      Continuous Controller 1 LSB (MODULATION BENDER)
  416.         34      Continuous Controller 2 LSB
  417.         35      Continuous Controller 3 LSB
  418.         36-63   Continuous Controllers 4-31 LSB
  419.         64-95   Switches (On/Off)
  420.         96-121  Undefined
  421.         122-127 Reserved for Channel Mode messages (see Table III).
  422.  
  423.  
  424. 6.  All controllers are specifically defined by agreement of the MIDI
  425. Manufacturers Association (MMA) and the Japan MIDI Standards Committee (JMSC).
  426. Manufacturers can request throught the MMA or JMSC that logical controllers be
  427. assigned to physical ones as necessary.  The controller allocation table must
  428. be provided in the user's operation manual.
  429.  
  430. 7.  Continuous controllers are divided into Most Significant and Least
  431. Significant Bytes.  If only seven bits of resolution are needed for any
  432. particular controllers, only the MSB is sent.  It is not necessary to send the
  433. LSB.  If more resolution is needed, then both are sent, first the MSB, then the
  434. LSB.  If only the LSB has changed in value, the LSB may be sent without
  435. re-sending the MSB.
  436.  
  437. 8.  vvvvvvv: control value (MSB)
  438.  
  439.      (for controllers)
  440.  
  441.           0
  442.               127
  443.         |-----------------------------------------------------------------|
  444.           min
  445.       max
  446.  
  447.      (for switches)
  448.  
  449.           0
  450.                127
  451. |        -        -        -        -        -        -        -        -
  452.   -        -        -    |
  453.            off
  454.               on
  455.  
  456.         Numbers 1 through 126, inclusive, are ignored.
  457.  
  458.  
  459. 9.  Any messages (e.g. Note On), which are sent successively under the same
  460. status, can be sent without a Status byte until a different Status byte is
  461. needed.
  462.  
  463. 10.  Sensitivity of the pitch bender is selected in the receiver.  Center
  464. position value (no pitch change) is 2000H, which would be transmitted
  465. EnH-00H-40H.
  466. TABLE III
  467.  
  468. CHANNEL MODE MESSAGES
  469.  
  470.  
  471. STATUS  DATA BYTES                   DESCRIPTION
  472.  
  473.  
  474. 1011nnnn        0ccccccc        Mode Messages
  475.         0vvvvvvv
  476.                         ccccccc = 122:  Local Control
  477.                         vvvvvvv = 0, Local Control Off
  478.                         vvvvvvv = 127, Local Control On
  479.  
  480.                         ccccccc = 123:  All Notes Off
  481.                         vvvvvvv = 0
  482.  
  483.                         ccccccc = 124: Omni Mode Off (All Notes Off)
  484.                         vvvvvvv = 0
  485.  
  486.                         ccccccc = 125: Omni Mode On (All Notes Off)
  487.                         vvvvvvv = 0
  488.  
  489.                         ccccccc = 126: Mono Mode On (Poly Mode Off)
  490.                                                    (All Notes Off)
  491.                         vvvvvvv = M, where M is the number of channels.
  492.                         vvvvvvv = 0, the number of channels equals the number 
  493.          of voices in the receiver.
  494.  
  495.                         ccccccc = 127: Poly Mode On (Mono Mode Off)
  496.                         vvvvvvv = 0    (All Notes Off)
  497.  
  498.  
  499. NOTES:
  500.  
  501. 1. nnnn: Basic Channel # (1-16, coded as defined in Table I)
  502.  
  503. 2.  Messages 123 thru 127 function as All Notes Off messages.  They will turn
  504. off all voices controlled by the assigned Basic Channel.  Except for message
  505. 123, All Notes Off, they should not be sent periodically, but only for a
  506. specific purpose.  In no case should they be used in lieu of Note Off commands
  507. to turn off notes which have been previously turned on.  Therefore any All
  508. Notes Off command (123-127) may be ignored by receiver with no possibility of
  509. notes staying on, since any Note On command must have a corresonding specific
  510. Note Off command.
  511.  
  512. 3.  Control Change #122, Local Control, is optionally used to interrupt the
  513. internal control path between the keyboard, for example, and the
  514. sound-generating circuitry.  If 0 (Local Off mesage) is received, the path is
  515. disconnected: the keyboard data goes only to MIDI and the sound-generating
  516. circuitry is controlled only by incoming MIDI data.  If a 7FH (Local On
  517. message) is received, normal operation is restored.
  518.  
  519. 4.  The third byte of "Mono" specifies the number of channels in which
  520. Monophonic Voice messages are to be sent.  This number, "M", is a number
  521. between 1 and 16.  The channel(s) being used, then, will be the current Basic
  522. Channel (=N) thru N+M-1 up to a maximum of 16.  If M=0, this is a special case
  523. directing the receiver to assign all its voices, one per channel, from the
  524. Basic Channel N through 16.
  525.  
  526.  
  527. TABLE IV
  528.  
  529. SYSTEM COMMON MESSAGES
  530.  
  531.  
  532. STATUS  DATA BYTES                   DESCRIPTION
  533.  
  534.  
  535. 11110001                Undefined
  536.  
  537. 11110010                Song Position Pointer
  538.         0lllllll        lllllll: (Least significant)
  539.         0hhhhhhh        hhhhhhh: (Most significant)
  540.  
  541. 11110011        0sssssss        Song Select
  542.                 sssssss: Song #
  543.  
  544. 11110100                Undefined
  545.  
  546. 11110101                Undefined
  547.  
  548. 11110110        none    Tune Request
  549.  
  550. 11110111        none    EOX: "End of System Exclusive" flag
  551.  
  552.  
  553. 1.  Song Position Pointer: Is an internal register which holds the number of
  554. MIDI beats (1 beat = 6 MIDI clocks) since the start of the song.  Normally it
  555. is set to 0 when the START switch is pressed, which starts sequence playback.
  556. It then increments with every sixth MIDI clock receipt, until STOP is pressed.
  557. If CONTINUE is pressed, it continues to increment.  It can be arbitrarily
  558. preset (to a resolution of 1 beat) by the SONG POSITION POINTER message.
  559.  
  560. 2.  Song Select:  Specifies which song or sequence is to be played upon
  561. receipt of a Start (Real-Time) message.
  562.  
  563. 3.  Tune Request:  Used with analog synthesizers to request them to tune their
  564. oscillators.
  565.  
  566. 4.  EOX:  Used as a flag to indicate the end of a System Exclusive
  567. transmission (see Table VI).
  568.  
  569.  
  570. TABLE V
  571.  
  572. SYSTEM REAL TIME MESSAGES
  573.  
  574.  
  575. STATUS  DATA BYTES               DESCRIPTION
  576.  
  577. 11111000                Timing Clock
  578. 11111001                Undefined
  579. 11111010                Start
  580. 11111011                Continue
  581. 11111100                Stop
  582. 11111101                Undefined
  583. 11111110                Active Sensing
  584. 11111111                System Reset
  585.  
  586.  
  587. NOTES:
  588.  
  589. 1.  The System Real Time messages are for synchronizing all of the system in
  590. real time.
  591.  
  592. 2.  The System Real Time messages can be sent at any time.  Any messages which
  593. consist of two or more bytes may be split to insert Real Time messages.
  594.  
  595. 3.  Timing clock (F8H)
  596. The system is synchronized with this clock, which is sent at a rate of 24
  597. clocks/quarter note.
  598.  
  599. 4.  Start (from the beginning of song) (FAH)
  600. This byte is immediately sent when the PLAY switch on the master (e.g.
  601. sequencer or rhythm unit) is pressed.
  602.  
  603. 5.  Continue (FBH)
  604. This is sent when the CONTINUE switch is hit.  A sequence will continue at the
  605. time of the next clock.
  606.  
  607. 6.  Stop (FCH)
  608. This byte is immediately sent when the STOP switch is hit.  It will stop the
  609. sequence.
  610.  
  611. 7.  Active Sensing (FEH)
  612. Use of this message is optional, for either receivers or transmitters.  This
  613. is a "dummy" Status byte that is sent every 300 ms (max), whenever there is no
  614. other activity on MIDI.  The receiver will operate normally if it never
  615. receives FEH.  Otherwise, if FEH is ever received, the receiver will expect to
  616. receive FEH or a transmission of any type every 300 ms (max).  If a period of
  617. 300 ms passes with no activity, the receiver will turn off the voices and
  618. return to normal operation.
  619.  
  620. 8.  System Reset (FFH)
  621. This message initializes all of the system to the condition of just having
  622. turned on power.  The system Reset message should be used sparingly, preferably
  623. under manual command only.  In particular, it should not be sent automatically
  624. on power up.
  625.  
  626.  
  627. TABLE VI
  628.  
  629. SYSTEM EXCLUSIVE MESSAGES
  630.  
  631.  
  632. STATUS  DATA BYTES             DESCRIPTION
  633.  
  634.  
  635. 11110000                Bulk dump etc.
  636.         0iiiiiii        iiiiiii:  identification
  637.              .
  638.         (0*******)
  639.              .  Any number of bytes may be sent here, for any
  640. purpose, as long as they all have a zero in the most significant bit.
  641.         (0*******)
  642.              .
  643.         11110111        EOX: "End of System Exclusive"
  644.  
  645.  
  646. NOTES:
  647.  
  648. 1.  iiiiiii: identification ID (0-127)
  649.  
  650. 2.  All bytes between the System Exclusive Status byte and EOX or the next
  651. Status byte must have zeroes in the MSB.
  652.  
  653. 3.  The ID number can be obtained from the MMA or JMSC.
  654.  
  655. 4.  In no case should other Status or Data bytes (except Real-Time) be
  656. interleaved with System Exclusive, regardless of whether or not the ID code is
  657. recognized.
  658.  
  659. 5.  EOX or any other Status byte, except Real-Time, will terminate a System
  660. Exclusive message, and should be sent immediately at its conclusion.
  661.  
  662. **** END of Spec. ****
  663.  
  664. -------------------------------------------------
  665.  
  666. From: Chris_Kilgour@mindlink.bc.ca (Chris Kilgour)
  667. Subject: Re: Serial/parallel <-> MIDI interface schematics?
  668. Date: Sat, 04 Jun 94 09:19:27 -0700 (PDT)
  669.  
  670. URADU@utcvm.utc.edu writes:
  671. > I'm not sure if this is the right spot for such requests, but I'm looking
  672. > for circuit diagrams for a MIDI interface for either the serial or
  673. > parallel port (NOT internal card - I need it for a notebook). I've been
  674. > hunting around for some schematics, or even more general info, but so far
  675. > nothing! Any help would be appreciated.
  676. > Paul
  677.  
  678. A simple schematic probably does not exist because MIDI is a serial data
  679. stream of 31.25 kbps.  Of course, your standard serial port does not talk
  680. this speed.  If you want to use the serial port directly, you need to
  681. operate at a higher baud rate and use an external buffer, which requires
  682. some intelligence.  Likewise, for a parallel interface you would need a
  683. UART, baud generator, etc.
  684.  
  685. My solution?  I changed the crystal in my serial port from 1.8432 MHz to
  686. 1.000 MHz.  Now when I ask for 57.6 kbps, it operates at 31.25 kbps!  Just
  687. a simple level translation to the MIDI current loop is required and !bang!,
  688. you have a MIDI interface.  It works well, but (unfortunately), there is no
  689. software out there for it.  I had to write my own .mid file player, but
  690. that worked too!
  691.  
  692. - Christopher D. Kilgour    Chris_Kilgour@mindlink.bc.ca
  693.  
  694. --------------------------------------------------------------------
  695. I might remind him that a 4MHz would do as well and requires asking for
  696. only a 14.4 kbps rate to get 31.25 kbps. Or roll your own. MIDI bps is
  697. 31.25kbps, which is just 1MHz/32 ! To figure the usual bps rates for RS232C,
  698. just divide 1.8432 MHz by binary powers! The UART uses a divisor to set the
  699. bit rate. And 5mA current loops from RS232C are found in lots of MIDI
  700. books, and there are a couple chips out there for RS422 that work fine!
  701. -Steve Walz
  702.  
  703.